<?php

defined('BASEPATH') or die('forbidden');
/**
 * 常量配置
 * @author  Karson
 * @name   constant.php
 * @since   2013-3-2 14:44:13
 */
//缓存
define('CACHE_DIR', dirname(BASEPATH) . '/application/datas/caches');
define('CACHE_TIME', 3600);
define('CACHE_SEPARATE', '###separate###');
define('CACHE_SUFFIX', '.cache.php');
define('CACHE_HEADER', '<?php defined("BASEPATH") or die("非法请求");?>');
//验证码
define('CAPTCHA_LENGTH', 4);
define('CAPTCHA_FONT', dirname(BASEPATH) . '/application/datas/verdana.ttf');
define('CAPTCHA_SIZE', 12);
define('CAPTCHA_ANGEL', mt_rand(-15, 15));
define('CAPTCHA_FILE', '');
define('CAPTCHA_WIDTH', '80');
define('CAPTCHA_HEIGHT', '30');
//COOKIE
define('COOKIE_TIME', 3600);
define('COOKIE_PREFIX', 'SH');
define('COOKIE_DOMAIN', $_SERVER['SERVER_NAME']);
//分页
define('PAGE_SIZE', 10);
define('PAGE_ITEM', 5);
//SESSION
define('SESSION_TO_DB', false);
define('SESSION_DB_NAME', 'session');
define('SESSION_DIR', dirname(BASEPATH) . '/application/datas/sessions');
define('SESSION_EXPIRE', 3600);
//内置视图引擎
define('VIEW_DIR', APPPATH . 'views');
define('VIEW_SUFFIX', '.php');
//模板引擎
define('TEMPLATE_DIR', APPPATH . 'views');
define('TEMPLATE_CACHE', DATAPATH . 'template');
define('TEMPLATE_FILTER', true);
define('TEMPLATE_SUFFIX', '.html');
//上传
define('UPLOAD_SUFFIX', '.jpg,.rar,.txt,.zip,.gif');
define('UPLOAD_FOLDER', 'uploads');
define('UPLOAD_MAX_SIZE', 102400000);
define('UPLOAD_OVERWRITE', FALSE);